package com.bbm.service.impl;


import com.bbm.entity.House;
import com.bbm.entity.vo.ResponseResult;
import com.bbm.mapper.HouseMapper;
import com.bbm.service.HouseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * (House)表服务实现类
 *
 * @author lionkliu
 * @since 2024-02-18 12:30:04
 */
@Service("houseService")
public class HouseServiceImpl implements HouseService {

    @Autowired
    private HouseMapper houseMapper;

    @Override
    public ResponseResult selectPage(Integer pageNum, Integer pageSize) {
        return null;
    }

    @Override
    public ResponseResult selectOne(Integer id) {
        return null;
    }

    @Override
    public ResponseResult insertOne(House house) {
        return null;
    }

    @Override
    public ResponseResult deleteById(Integer id) {
        return null;
    }

    @Override
    public ResponseResult updateOne(House house) {
        return null;
    }

    @Override
    public ResponseResult list() {
        List<House> houseList = houseMapper.list();
        return ResponseResult.okResult(houseList);
    }

    @Override
    public ResponseResult getHouseById(Integer id) {
        House house = houseMapper.getHouseById(id);
        return ResponseResult.okResult(house);
    }

    @Override
    public ResponseResult getHouseByCategoryId(Integer id) {
        List<House> houseList = houseMapper.getHouseByCategoryId(id);
        return ResponseResult.okResult(houseList);
    }
}

